/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
using DGZImp.SysEntity;

namespace DGZImp.MdsProject.DomainModels
{
    [Entity(TableCnName = "生产任务状态",TableName = "Mds_ProductionTask",DetailTable =  new Type[] { typeof(Mds_ProductionTaskLog)},DetailTableCnName = "任务日志",DBServer = "ServiceDbContext")]
    public partial class Mds_ProductionTask:ServiceEntity
    {
        /// <summary>
       ///ID
       /// </summary>
       [SugarColumn(IsPrimaryKey = true)]
       [Key]
       [Display(Name ="ID")]
       [Column(TypeName="bigint")]
       [Required(AllowEmptyStrings=false)]
       public long ProductionTaskId { get; set; }

       /// <summary>
       ///工序
       /// </summary>
       [Display(Name ="工序")]
       [Column(TypeName="bigint")]
       [Editable(true)]
       public long? GroupId { get; set; }

       /// <summary>
       ///设备
       /// </summary>
       [Display(Name ="设备")]
       [Column(TypeName="bigint")]
       [Editable(true)]
       public long? MachineId { get; set; }

       /// <summary>
       ///工令
       /// </summary>
       [Display(Name ="工令")]
       [MaxLength(200)]
       [Column(TypeName="nvarchar(200)")]
       [Editable(true)]
       public string WorkOrder { get; set; }

       /// <summary>
       ///任务状态
       /// </summary>
       [Display(Name ="任务状态")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? TaskStatus { get; set; }

       /// <summary>
       ///开始时间
       /// </summary>
       [Display(Name ="开始时间")]
       [Column(TypeName="datetime")]
       public DateTime? BeginTime { get; set; }

       /// <summary>
       ///结束时间
       /// </summary>
       [Display(Name ="结束时间")]
       [Column(TypeName="datetime")]
       public DateTime? EndTime { get; set; }

       /// <summary>
       ///计划开始时间
       /// </summary>
       [Display(Name ="计划开始时间")]
       [Column(TypeName="datetime")]
       public DateTime? PlanBeginTime { get; set; }

       /// <summary>
       ///计划结束时间
       /// </summary>
       [Display(Name ="计划结束时间")]
       [Column(TypeName="datetime")]
       public DateTime? PlanEndTime { get; set; }

       /// <summary>
       ///是否有效
       /// </summary>
       [Display(Name ="是否有效")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int IsValid { get; set; }

       /// <summary>
       ///创建用户
       /// </summary>
       [Display(Name ="创建用户")]
       [Column(TypeName="bigint")]
       public long? CreateId { get; set; }

       /// <summary>
       ///创建人
       /// </summary>
       [Display(Name ="创建人")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string Creator { get; set; }

       /// <summary>
       ///创建时间
       /// </summary>
       [Display(Name ="创建时间")]
       [Column(TypeName="datetime")]
       public DateTime? CreateTime { get; set; }

       /// <summary>
       ///修改用户
       /// </summary>
       [Display(Name ="修改用户")]
       [Column(TypeName="bigint")]
       public long? ModifyId { get; set; }

       /// <summary>
       ///修改人
       /// </summary>
       [Display(Name ="修改人")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       public string Modifier { get; set; }

       /// <summary>
       ///修改时间
       /// </summary>
       [Display(Name ="修改时间")]
       [Column(TypeName="datetime")]
       public DateTime? ModifyTime { get; set; }

       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(512)]
       [Column(TypeName="nvarchar(512)")]
       [Editable(true)]
       public string Remarks { get; set; }

       /// <summary>
       ///计划数量
       /// </summary>
       [Display(Name ="计划数量")]
       [DisplayFormat(DataFormatString="10,4")]
       [Column(TypeName="decimal")]
       public decimal? PlanQty { get; set; }

       /// <summary>
       ///计划重量
       /// </summary>
       [Display(Name ="计划重量")]
       [DisplayFormat(DataFormatString="10,6")]
       [Column(TypeName="decimal")]
       public decimal? PlanWeight { get; set; }

       /// <summary>
       ///完成数量
       /// </summary>
       [Display(Name ="完成数量")]
       [DisplayFormat(DataFormatString="10,4")]
       [Column(TypeName="decimal")]
       public decimal? FinishedQty { get; set; }

       /// <summary>
       ///完工重量
       /// </summary>
       [Display(Name ="完工重量")]
       [DisplayFormat(DataFormatString="10,6")]
       [Column(TypeName="decimal")]
       public decimal? FinishedWeight { get; set; }

       [Display(Name ="任务日志")]
       [ForeignKey("ProductionTaskId")][Navigate(NavigateType.OneToMany,nameof(ProductionTaskId),nameof(ProductionTaskId))]
       public List<Mds_ProductionTaskLog> Mds_ProductionTaskLog { get; set; }


       
    }
}